<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/include/taglibs.jsp" %>
<html>
<head>
	<%@include file="/include/header.html"%>
	<script type="text/javascript" src="${ctx}/appjs/tenant/menu/menu.js"></script>
</head>

<script type="text/javascript">
	$('#topLink', window.parent.document).html(function(i,origText){
		return '<h3>菜单管理</h3>' +
				'<ol class="breadcrumb">' +
				'<li class="breadcrumb-item">' +
				'<a href="">主页</a>' +
				'</li>' +
				'<li class="breadcrumb-item">' +
				'<a>系统管理</a>' +
				'</li>' +
				'<li class="breadcrumb-item">' +
				'<strong>菜单列表</strong>' +
				'</li>' +
				'<li class="breadcrumb-item">' +
				'<a href="javascript:window.history.back()"><i class="fa fa-times"></i> 返回</a>' +
				'</li>' +
				'</ol>';
	});
</script>

<body class="gray-bg">
<div class="wrapper wrapper-content">
	<div class="row">
		<div class="col-sm-12">
			<div class="ibox float-e-margins">
				<div class="ibox-title">
					<h5><strong>修改资料</strong></h5>
					<div class="ibox-tools">
						<a class="close-link">
							<i class="fa fa-times"></i>
						</a>
					</div>
				</div>
				<div class="ibox-content">
					<form class="form-horizontal m-t" id="frmMenu">
						<input id="parentId" name="parentId" type="hidden"	value="${parentId}" />
						<input id="tenantMenuId" name="tenantMenuId" type="hidden" value="${menu.tenantMenuId}" />
						<div class="form-group">
							<label class="col-sm-3 control-label">上级菜单：</label>
							<div class="col-sm-8">
								<input id="" name="" class="form-control" type="text"
									   value="${parentName}" readonly>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">菜单类型：</label>
							<div class="col-sm-8">
								<label class="radio-inline"> <input type="radio"
																	name="menuType" value="0" ${menu.menuType == "0"?'checked':''} /> 目录
								</label> <label class="radio-inline"> <input type="radio"
																			 name="menuType" value="1" ${menu.menuType == "1"?'checked':''}/> 菜单
							</label> <label class="radio-inline"> <input type="radio"
																		 name="menuType" value="2" ${menu.menuType == "2"?'checked':''}/> 按钮
							</label>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">菜单名称：</label>
							<div class="col-sm-8">
								<input id="menuName" name="menuName" class="form-control" type="text" value="${menu.menuName}" required>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-3 control-label">说明：</label>
							<div class="col-sm-8">
								<input id="remarks" name="remarks" class="form-control" type="text"
									   value="${menu.remarks}">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">链接地址：</label>
							<div class="col-sm-8">
								<input id="href" name="href" class="form-control" type="text"
									   value="${menu.href}">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">权限标识：</label>
							<div class="col-sm-8">
								<input id="permission" name="permission" class="form-control" type="text"
									   value="${menu.permission}">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">排序号：</label>
							<div class="col-sm-8">
								<input id="sort" name="sort" class="form-control"
									   type="text" value="${menu.sort}">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">状态:</label>
							<div class="col-sm-8">
								<label class="radio-inline">
									<input type="radio" name="status" value="0" ${menu.status == "0"?'checked':''}/>显示
								</label>
								<label class="radio-inline">
									<input type="radio" name="status" value="1" ${menu.status == "1"?'checked':''}/>隐藏
								</label>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">图标：</label>
							<div class="col-sm-10">
								<div class="row">
									<div class="col-md-6"><input id="icon" name="icon" class="form-control" type="text" value="${menu.icon}"></div>
									<div class="col-md-3"><input id="ico-btn" class="btn btn-warning" type="button" value="选择图标"></div>
								</div>
							</div>
						</div>
						<div class="form-group">
							<div class="col-sm-8 col-sm-offset-3">
								<button type="submit" class="btn btn-info">提交</button>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
	editMenu.init();
</script>
</body>

</html>
